﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DacSanMienTayOBJ;
namespace DacSanMienTay.UserControl
{
    public partial class ProductDetail : System.Web.UI.UserControl
    {
        public string productName;
        public string productOriginal;
        public string productGuide;
        public string measurement;
        public string description;
        public string productImage;
        public string price;
        public string original;
        public int productID = 3;
        protected void Page_Load(object sender, EventArgs e)
        {
            GetProductDetail();
        }
        private void GetProductDetail()
        {
            try
            {
                productID = 3;
                Product product = ProductBusiness.GetProductDetail(productID, ConnectionType.UserConnection);
                if(product!=null)
                {
                    productName=product.ProductName;
                    productOriginal=product.ProductOriginal;
                    productGuide=product.ProductGuide;
                    productImage=Utility.modHost+"/"+product.ProductImage;
                    measurement=product.MeasurementUnits;
                    price=string.Format("{0:0,0}",product.RealPrice);
                    description=HttpUtility.HtmlDecode(product.ContentProduct);

                }
            }
            catch
            {

            }
        }
    }
}